﻿<Window x:Class="THEMXOASUA.DSHOADON"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DANH SÁCH HÓA ĐƠN" Height="500" Width="1000"
        Loaded="Window_Loaded_1">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ToolBarTray  Grid.Row="0"  >
            <ToolBar Band="1" BandIndex="1">
                <Button  Name="mnNew"  ToolTip="New" Click="mnNew_Click_1">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Right" Source="D:/window c#/Images/NewDocumentHS.png"/>
                        <TextBlock VerticalAlignment="Center">THÊM MỚI</TextBlock>

                    </StackPanel>
                </Button>
                <Button  Name="update" Click="update_Click_1" ToolTip="update">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Right" Source="D:/window c#/Images/EditTableHS.png"/>
                        <TextBlock VerticalAlignment="Center">SỬA</TextBlock>

                    </StackPanel>
                </Button>
                <Button  Name="mnxoa" ToolTip="xoa" Click="mnxoa_Click_1">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Right" Source="D:/window c#/Images/DeleteHS.png"/>
                        <TextBlock VerticalAlignment="Center">XÓA</TextBlock>

                    </StackPanel>
                </Button>

                <Button ToolTip="SEARCH" Name="SEARCH" Click="SEARCH_Click_1">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="30" Height="25" Source="D:/window c#/Images/2.png"/>
                        <TextBlock VerticalAlignment="Center">TÌM KIẾM</TextBlock>


                    </StackPanel>
                </Button>


                <Button ToolTip="print" Name="in" Click="in_Click_1">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="30" Height="25" Source="D:/window c#/Images/PrintHS.png" />
                        <TextBlock VerticalAlignment="Center" >IN</TextBlock>
                    </StackPanel>
                </Button>


                <Button ToolTip="CLOSE" Name="BTCLOSE" Click="BTCLOSE_Click_1">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="30" Height="30" Source="D:/window c#/Images/StopHS.png"/>
                        <TextBlock VerticalAlignment="Center">THOÁT</TextBlock>


                    </StackPanel>
                </Button>
            </ToolBar>
        </ToolBarTray>
        <DataGrid Name="datagrid" Grid.Row="1" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Số hóa đơn" Width="100" Binding="{Binding sohd}" ></DataGridTextColumn>
                <DataGridTextColumn Header="Tên Hàng" Width="100"  Binding="{Binding tenhang}" ></DataGridTextColumn>
                <DataGridTextColumn Header="Số Lượng" Width="100" Binding="{Binding soluong, StringFormat={}{0:N0}}"  ></DataGridTextColumn>
                <DataGridTextColumn Header="Đơn giá" Width="100" Binding="{Binding dongia,StringFormat={}{0:N0}}" ></DataGridTextColumn>
                <DataGridTextColumn Header="Trị Giá" Width="100" Binding="{Binding trigia,StringFormat={}{0:N0}}" ></DataGridTextColumn>
                <DataGridTextColumn Header="Khuyến Mãi" Width="100" Binding="{Binding khuyenmai,StringFormat={}{0:N0}}" ></DataGridTextColumn>
                <DataGridTextColumn Header="Diễn Giải" Width="*" Binding="{Binding diengiai}"></DataGridTextColumn>


            </DataGrid.Columns>
        </DataGrid>
        <StatusBar Grid.Row="2">
            <StatusBarItem Name="sbi" Content="Tổng số hóa đơn:"/>
        </StatusBar>


    </Grid>

</Window>
